package com.shop.cereshop.admin.controller.history;

import com.shop.cereshop.admin.param.history.WebHistoryParam;
import com.shop.cereshop.admin.service.history.CereWebHistoryService;
import com.shop.cereshop.commons.domain.common.Page;
import com.shop.cereshop.commons.domain.history.CereWebHistory;
import com.shop.cereshop.commons.result.Result;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/history")
@Api(value = "WebHistoryController")
@RequiredArgsConstructor
public class WebHistoryController {
//   分页查询 操作历史历史记录查询接口
    @Autowired
   private   CereWebHistoryService cereWebHistoryService;

    @PostMapping("/info")
    public Result<Page<CereWebHistory>> getWebHistoryInfo(@RequestBody WebHistoryParam webHistoryParam) {
        Page<CereWebHistory> history = cereWebHistoryService.getHistory(webHistoryParam);
        return   Result.success(history)  ;
    }

}
